<template>
       <div>
            <img :src="imgUrl" height="200px" @click="imgClick"/>
            <div class="info">
                <h5>{{title}}</h5>
                <div><slot name="tool"/></div>
            </div>
        </div>
</template>

<script setup>
   const props = defineProps(['imgUrl','title'])
   const emit = defineEmits(['clickImg'])
   const imgClick = function(){
       //触发事件，通知父组件
       emit('clickImg',props.imgUrl)
      
   }
       
</script>

<style scoped>
   .info{
       display:flex;
       justify-content:space-between;
       align-items:center;
   }
</style>